using System.ComponentModel.DataAnnotations;
using System.Data.Entity.ModelConfiguration;
using SalesPages.DomainModel;
namespace SalesPages.EntityFrameworkRepository.Mapping
{
    public class Press_PrintManagerMap : EntityTypeConfiguration<Press_PrintManager>
    {
        public Press_PrintManagerMap()
        {
            // Primary Key
            this.HasKey(t => t.Printmanager_id);

            // Properties
            this.Property(t => t.locale)
                .IsFixedLength()
                .HasMaxLength(2);

            this.Property(t => t.headline_cs)
                .HasMaxLength(80);

            this.Property(t => t.headline_en)
                .HasMaxLength(240);

            this.Property(t => t.publication_cs)
                .HasMaxLength(80);

            this.Property(t => t.publication_en)
                .HasMaxLength(80);

            this.Property(t => t.description_cs)
                .HasMaxLength(200);

            this.Property(t => t.description_en)
                .HasMaxLength(300);

            // Table & Column Mappings
            this.ToTable("Press_PrintManager");
            this.Property(t => t.Printmanager_id).HasColumnName("Printmanager_id");
            this.Property(t => t.locale).HasColumnName("locale");
            this.Property(t => t.headline_cs).HasColumnName("headline_cs");
            this.Property(t => t.headline_en).HasColumnName("headline_en");
            this.Property(t => t.displaydate).HasColumnName("displaydate");
            this.Property(t => t.publishdate).HasColumnName("publishdate");
            this.Property(t => t.publication_cs).HasColumnName("publication_cs");
            this.Property(t => t.publication_en).HasColumnName("publication_en");
            this.Property(t => t.description_cs).HasColumnName("description_cs");
            this.Property(t => t.description_en).HasColumnName("description_en");
            this.Property(t => t.rank).HasColumnName("rank");
            this.Property(t => t.printimage_id).HasColumnName("printimage_id");
            this.Property(t => t.logoimage_id).HasColumnName("logoimage_id");
            this.Property(t => t.logoimage_en_id).HasColumnName("logoimage_en_id");
        }
    }
}
